<!--
- @founder   IT柏拉图, https: //weibo.com/itprato
- @author    DedeCMS团队
- @copyright Copyright (c) 2007 - 2021, 上海卓卓网络科技有限公司 (DesDev, Inc.)
--->

<html>
<head>
<meta charset="{dede:global.cfg_soft_lang/}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>修改<?php echo $row['name']?>会员模型</title>
<meta name="copyright" content="2007-2021 DedeCMS, 上海卓卓网络科技有限公司 (DesDev, Inc.)" />
<link rel="icon" href="/favicon.ico" />
<!-- CSS FILES -->
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_assets_dir/}/pkg/uikit/css/uikit.min.css" />
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_assets_dir/}/css/manage.dede.css">
<style type="text/css">
.uk-table td{
padding: 6px 12px;
vertical-align: top;
height: 35px;
}
</style>
</head>
<body>
<!-- 列表头部 -->
<div id="Table_Header_202X2W2X1X292F" class="uk-card uk-card-small uk-card-default" uk-sticky="bottom: #offset">
<div id="Header_1W2T2S2T1V252B" class="uk-card-header">
<div class="uk-grid uk-grid-small uk-text-small">
<span><ul class="uk-breadcrumb"><li><a href="member_model_main.php">会员模型管理</a></li><li><span>修改<?php echo $row['name']?>会员模型</span></li></ul></span>
</div>
</div>
</div>
<!-- /列表头部 -->
<!-- 列表主体 -->
<div class="uk-card uk-card-small uk-card-default" style="top:-20px;margin-bottom: 50px;">
<div class="uk-card-body uk-overflow-auto" grid>
<div class="uk-child-width-1-1 uk-padding">
<table width="98%" border="0" cellpadding="1" cellspacing="1" class="uk-table">
<form name="form1" action="member_model_edit.php" method="post" onSubmit="return CheckSubmit();">
<input type='hidden' name='id' value='<?=$id;?>'>
<input type='hidden' name='name' value='<?=$row['name'];?>'>
<input type='hidden' name='dopost' value='save'>
<!-- 选项 -->
<tr>
<td width="25%">会员模型ID：</td>
<td>
<?php echo $id;?>
( 数字，创建后不可修改，并具有唯一性。
<?php if($row['issystem']) echo "<font color='red'>系统模型,我们不建议您去修改基本配置信息!</font>";?> )
</td>
</tr>
<tr>
<td>模型名称：</td>
<td>
<input name="name" type="text" id="name" value="<?php echo $row['name']?>" class="uk-input uk-form-small uk-form-width-large" <?php if($row['issystem']) echo "disabled='1'" ;?> />
会员模型类型统一使用中文,前台后台都保持一致。
</td>
</tr>
<tr>
<td>数据表：</td>
<td>
<input name="table" type="text" id="table" class="uk-input uk-form-small uk-form-width-large" value="<?php echo $row['table']; ?>" disabled/>
模型表一旦创建不可修改
</td>
</tr>
<tr>
<td>模型字段配置：<br />
信息索引类字段系统已经加入，<br />
您只需要增加其它个性化字段即可。</td>
<td>
<a href="member_model_field_add.php?id=<?php echo $id; ?>" class="uk-button uk-button-default uk-button-small">添加新字段</a>
</td>
</tr>
<tr>
<td colspan='2' style="padding:0px;padding-top: 25px;padding-bottom: 25px;">
<table width="100%" class="uk-table uk-table-small uk-table-responsive uk-table-striped">
<thead>
<tr>
<td width="12%">提示文字</td>
<td width="12%">数据字段名</td>
<td width="12%">数据类型</td>
<td width="12%">前台显示</td>
<td width="12%">条件搜索</td>
<td width="12%">状态</td>
<td width="12%">表单类型</td>
<td width="16%">维护</td>
</tr>
</thead>
<tbody>
<?php
$fieldset = $row['info'];
$dtp = new DedeTagParse();
$dtp->SetNameSpace("field","<",">");
$dtp->LoadSource($fieldset);
if(is_array($dtp->CTags)){
foreach($dtp->CTags as $ctag)
{
?>
<tr>
<td>
<?php
$itname = $ctag->GetAtt('itemname');
if($itname=='') echo "没指定";
else echo $itname;
?>
</td>
<td>
<?php echo $ctag->GetTagName()?>
</td>
<td>
<?php
$ft = $ctag->GetAtt('type');
if(isset($fieldtypes[$ft])) echo $fieldtypes[$ft];
else echo "系统专用类型";
?>
</td>
<td>
<?php
$issearch = $ctag->GetAtt('issearch');
echo ($issearch == '1')? "<font color=green>√</font>" : "<font color=red>×</font>";
?>
</td>
<td>
<?php
$isshow = $ctag->GetAtt('isshow');
echo ($isshow == '1')? "<font color=green>√</font>" : "<font color=red>×</font>";
?>
</td>
<td>
<?php
$state = $ctag->GetAtt('state');
echo ($state == 1)? "<font color=green>√</font>" : "<font color=red>×</font>";
?>
</td>
<td>
<?php
$ft = $ctag->GetAtt('autofield');
if($ft==''||$ft==0) echo "固化表单";
else echo "自动表单";
?>
</td>
<td><a
href="member_model_field_edit.php?id=<?php echo $id;?>&fname=<?php echo $ctag->GetTagName()?>">[修改]</a>
<a
href="member_model_field_edit.php?id=<?php echo $id;?>&action=disabled&fname=<?php echo $ctag->GetTagName()?>">[
<?php echo ($ctag->GetAtt('state')==1)? "禁用" : "启用" ?>]
</a>
<a
href="member_model_field_edit.php?id=<?php echo $id;?>&action=delete&fname=<?php echo $ctag->GetTagName()?>">[删除]</a>
</td>
</tr>
<?php
}}
?>
</tbody>
</table>
</td>
</tr>
<tr>
<td>模型描述：</td>
<td><label>
<textarea name="description" cols="50" rows="5" class="uk-textarea uk-form-small uk-form-width-large"><?php echo $row['description']; ?></textarea>
</label></td>
</tr>
<tr>
<td>会员模型状态：</td>
<td><input name="state" type="radio" class='uk-radio' value="1" <?php if($row['state']=='1' ) echo " checked" ; ?> />
启用 &nbsp;&nbsp;
<input name="state" type="radio" value="0" class='uk-radio' <?php if($row['state']=='0' ) echo " checked" ; ?> />
禁用
</td>
</tr>
<!-- /选项 -->
</table>
</div>
</div>
<div class="uk-card-footer " >
<div class="uk-padding-small" >
<button type="submit" class="uk-button uk-button-small uk-button-primary">提交</button>
</div>
</div>
</div>
</form>
<!-- 列表底部 -->
<div class="bar-bottom uk-flex uk-light uk-flex-right">
<div class="uk-button-group" style="margin-left: 50px;">
</div>
<div class="e1e02">Copyright &copy; 2007-2021 <a href='http://www.dedecms.com' target='_blank'><u>DedeCMS</u></a>, 上海卓卓网络科技有限公司 (DesDev, Inc.)</div>
</div>
<!-- 列表底部 -->
<!-- JS FILES -->
<script src="{dede:global.cfg_assets_dir/}/pkg/uikit/js/uikit.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/pkg/uikit/js/uikit-icons.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/pkg/jquery/jquery.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/js/dede.manage.min.js"></script>
<script language="javascript">
function CheckSubmit() {
if (document.form1.typename.value == '') {
alert("自定义表单名称不能为空！");
return false;
}
return true;
}
//删除
function DelNote(gourl) {
if (!window.confirm("你确认要删除这条记录么！")) { return false; }
location.href = gourl;
}
</script>
<!-- / JS FILES -->
</body>
</html>
